﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ChineseFoodDetail.aspx.vb" Inherits="_14073716_Prototype.ChineseFoodDetail" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p style="color: #FF6600; font-size: xx-large">
        The
        Current Tags:</p>
    <asp:BulletedList ID="BulletedList1" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="Tag" DataValueField="Tag">
    </asp:BulletedList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
        ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
        
        SelectCommand="SELECT DISTINCT [Tag], [ID] FROM [ChineseFoodTagView] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" 
                QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
        &nbsp;</p>
    <p style="color: #FF6600; font-size: xx-large">
        The Current Food:</p>
    <p>
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" CellSpacing="2" DataKeyNames="ID" DataSourceID="ChineseFoodDb">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="ChineseFoodUrl_English_Wikipedia" 
                    DataNavigateUrlFormatString="{0}" DataTextField="ChineseFoodName_English" 
                    HeaderText="Chinese Food Name English" />
                <asp:HyperLinkField DataNavigateUrlFields="ChineseFoodUrl_Chinese_Baidu" 
                    DataNavigateUrlFormatString="{0}" DataTextField="ChineseFoodName_Chinese" 
                    HeaderText="Chinese Food Name Chinese" />
                <asp:HyperLinkField DataNavigateUrlFields="AreaOfOriginUrl_English_GoogleMap" 
                    DataNavigateUrlFormatString="{0}" DataTextField="AreaOfOrigin_English" 
                    HeaderText="Area of Origin English" />
                <asp:BoundField DataField="AreaOfOrigin_Chinese" 
                    HeaderText="Area Of Origin Chinese" 
                    SortExpression="AreaOfOrigin_Chinese" />
                <asp:BoundField DataField="AvgOfRating" HeaderText="Average Of Rating" 
                    ReadOnly="True" SortExpression="AvgOfRating" />
                <asp:CheckBoxField DataField="Hot" HeaderText="Hot" SortExpression="Hot" />
                <asp:CheckBoxField DataField="Vegetarian" HeaderText="Vegetarian" 
                    SortExpression="Vegetarian" />
                <asp:TemplateField HeaderText="Go to List">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton1" runat="server" Height="200px" 
                            ImageUrl='<%# Eval("Picture", "{0}") %>' 
                            PostBackUrl='<%# Eval("ID","ChineseFoodList.aspx") %>' Width="200px" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
    </p>
    <p>
        <asp:SqlDataSource ID="ChineseFoodDb" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            
            SelectCommand="SELECT * FROM [ChineseFoodAndAvgRating] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p style="color: #FF6600; font-size: xx-large">
        Whether I Liked It:</p>
    <p>
        <asp:Button ID="btn_Like" runat="server" Text="Like this?" 
            style="height: 21px" />
&nbsp;<asp:Image ID="Img_Smile" runat="server" ImageUrl="~/Images/a.png" />
        <asp:Button ID="btn_CancelLike" runat="server" Text="Cancel Like" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p style="color: #FF6600; font-size: xx-large">
        Submit Rating:</p>
        <asp2:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp2:ToolkitScriptManager>
    <asp2:Rating  BorderWidth="1" BorderStyle="Solid"
    width="200" 
    Height="40" 
    ID="Rating1"  
    CurrentRating="2" 
    runat="server" 
    StarCssClass="ratingStar" 
    WaitingStarCssClass="savedRatingStar" 
    EmptyStarCssClass="emptyRatingStar" 
    filledStarCssClass="filledRatingStar"
    MaxRating="5" 
    >
    </asp2:Rating>
        <br />
        <asp:Button ID="btn_Rating" runat="server" Text="Rate it!" />
    <p>
        &nbsp;</p>
    <p style="color: #FF6600; font-size: large">
        &nbsp;</p>
    <p style="color: #FF6600; font-size: xx-large">
        Submit Tag:</p>
    <p>
        <asp:TextBox ID="tb_NewTags" runat="server" style="margin-bottom: 0px"></asp:TextBox>
    </p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            DataSourceID="SqlDataSource1" DataTextField="Tag" DataValueField="ID" 
            RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            SelectCommand="SELECT DISTINCT [ID], [Tag] FROM [Tags] ORDER BY [Tag]">
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Submit Tag" />
        <p>
            &nbsp;<p 
        style="color: #FF6600; font-size: large">
        &nbsp;<p 
        style="color: #FF6600; font-size: xx-large">
        The Current Comments:
        <div style = "overflow:auto;height:500px">
        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource3" Height="216px" Width="896px" CellPadding="4" 
                ForeColor="#333333" GridLines="None" BorderColor="#1C5E55" 
                BorderWidth="5px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                
                <ItemTemplate>
                <h2><%# Eval("Subject") %></h2><br />
                <br />
                <h1><%# Eval("Author") %>
                <a href='Profile.aspx?TravellerName=<%# Eval("TravellerName")%>'>
                <img src='<%# Eval("Picture") %>' width=50px height=50px /></a></h1><br />
                <br />
                <h2><%# Eval("Message") %></h2>
                </ItemTemplate>
                
                
                
                
                
                
                
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ChineseFoodConn %>" 
            ProviderName="<%$ ConnectionStrings:ChineseFoodConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [UserAndComment] WHERE ([ChineseFoodID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ChineseFoodID" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        </div>
    <p style="color: #FF6600; font-size: large">
        &nbsp;</p>
    <p style="color: #FF6600; font-size: large">
        &nbsp;</p>
    <p style="color: #FF6600; font-size: xx-large">
        Add 
        My Comment:</p>
    <p>
        User Name: <asp:LoginName ID="LoginName1" runat="server" />
    </p>
    <p>
        Title:</p>
    <p>
        <asp:TextBox ID="tb_Subject" runat="server" Height="19px" Width="300px"></asp:TextBox>
    </p>
    <p>
        Comment:
        </p>
    <p>
        <asp:TextBox ID="tb_Message" runat="server" Height="200px" TextMode="MultiLine" 
            Width="300px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="btn_Submit" runat="server" Text="Submit Comment" Width="150px" 
            Height="46px" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
</asp:Content>
